package Lab02.test32;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by Administrator on 2017/11/9.
 */
public class Test {
    public static void main(String[] args) {
        Map<String,String> map =new  HashMap<>();
        //向map中2添加数据
        // 往集合中添加5个“键－值”对象：id—>"1"、name—>"张三"、gender—>"男"、 age—>"25"、love—>"爱学Java"；
        map.put("id","1");
        map.put("name","张三");
        map.put("gender","男");
        map.put("age","25");
        map.put("love","爱学java");
        //
        for (Map.Entry<String,String> entry : map.entrySet()){
            System.out.println(entry.getKey());
            System.out.println(entry.getValue());
        }
        System.out.println("集合大小： " + map.size());
        //删除集合中的键为age的元素
        for (Map.Entry<String,String> entry : map.entrySet()){
            if (entry.getKey().equals("age")){
            }
        }
    }
}
